<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html >
<head>
	<meta name="decorator" content="sysDefault" content="text/html; charset=utf-8"/>
	<script src="${staticPath}/js/pospay/opendialog.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#key").focus();
			$("#dataForm").validate({
				submitHandler: function(form){
					Oosp_Loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
		
	</script>
</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-xs-12">
				<div class="panel panel-default">
				  <div class="panel-heading">
				    <h3 class="panel-title">编辑数据
						<a class="btn btn-default btn-sm pull-right" role="button" href="javascript:void(0)" onclick="history.go(-1)">返回</a>
				    </h3>
				  </div>
				  <div class="panel-body">
					<form:form id="dataForm" modelAttribute="promPolicy" action="${contextPath}/pospay/promPolicy/save" method="post" class="form-horizontal" role="form">
						<form:hidden path="id"/>
						<tags:message content="${message}"/>
								<div class="form-group">
									<label for="promPolicyNo" class="col-sm-2 control-label">策略编码:</label>
									<div class="col-sm-2">
										<form:input id="promPolicyNo" path="promPolicyNo" maxlength="20" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="promPolicyName" class="col-sm-2 control-label">策略名称:</label>
									<div class="col-sm-2">
										<form:input id="promPolicyName" path="promPolicyName" maxlength="20" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="policyType" class="col-sm-2 control-label">策略类别ID(买N送N、打折、买N减N等:</label>
									<div class="col-sm-2">
										<form:input id="policyType" path="policyType" maxlength="20" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="buyNum" class="col-sm-2 control-label">购买数量:</label>
									<div class="col-sm-2">
										<form:input id="buyNum" path="buyNum" maxlength="20" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="buyAmount" class="col-sm-2 control-label">购买金额:</label>
									<div class="col-sm-2">
										<form:input id="buyAmount" path="buyAmount" maxlength="20" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="discLow" class="col-sm-2 control-label">折扣率下限(生效的促销方案不能低于该折扣率下限，例如设置70，:</label>
									<div class="col-sm-2">
										<form:input id="discLow" path="discLow" maxlength="20" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="addMoney" class="col-sm-2 control-label">附加金额(如果是需要另外缴纳金额才能满足促销条件的话，:</label>
									<div class="col-sm-2">
										<form:input id="addMoney" path="addMoney" maxlength="20" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="discount" class="col-sm-2 control-label">优惠折扣(促销打折率设置:</label>
									<div class="col-sm-2">
										<form:input id="discount" path="discount" maxlength="20" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="reduceAmount" class="col-sm-2 control-label">满减金额:</label>
									<div class="col-sm-2">
										<form:input id="reduceAmount" path="reduceAmount" maxlength="20" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="numGive" class="col-sm-2 control-label">赠送数量(自营商品买1送1使用:</label>
									<div class="col-sm-2">
										<form:input id="numGive" path="numGive" maxlength="20" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="couponGive" class="col-sm-2 control-label">赠送金额(送券额:</label>
									<div class="col-sm-2">
										<form:input id="couponGive" path="couponGive" maxlength="20" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="exchangeAmount" class="col-sm-2 control-label">买换金额:</label>
									<div class="col-sm-2">
										<form:input id="exchangeAmount" path="exchangeAmount" maxlength="20" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="couponLimit" class="col-sm-2 control-label">限制收券额(例如100限收20购物券:</label>
									<div class="col-sm-2">
										<form:input id="couponLimit" path="couponLimit" maxlength="20" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="enabled" class="col-sm-2 control-label">禁用标志:</label>
									<div class="col-sm-2">
										<form:input id="enabled" path="enabled" maxlength="20" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="cashRate" class="col-sm-2 control-label">现金比率(100换400券为1/4):</label>
									<div class="col-sm-2">
										<form:input id="cashRate" path="cashRate" maxlength="20" class="form-control"/>
									</div>
								</div>
						<div class="form-group">
						  <div class="col-sm-offset-2 col-sm-10">
						    <input class="btn btn-primary" type="submit" value="保 存"/>
							<input class="btn btn-default" type="button" value="返 回" onclick="history.go(-1)"/>
						  </div>
						</div>
					</form:form>
				  </div>
				</div>			
			</div>
		</div>
	</div>
</body>
</html>